﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace DSkinTheme
{
    public class TabItem : DSkin.Controls.DSkinTabItem
    {
        public TabItem()
        {
            InitializeComponent();
        }

        private DSkin.DirectUI.DuiIcon duiIcon1;

        private void InitializeComponent()
        {
            this.duiIcon1 = new DSkin.DirectUI.DuiIcon();
            // 
            // duiIcon1
            // 
            this.duiIcon1.Cursor = System.Windows.Forms.Cursors.Hand;
            this.duiIcon1.DesignModeCanResize = false;
            this.duiIcon1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(176)))), ((int)(((byte)(176)))), ((int)(((byte)(176)))));
            this.duiIcon1.GraphicsUnit = System.Drawing.GraphicsUnit.Pixel;
            this.duiIcon1.Icon = DSkin.Common.FontAwesomeChars.icon_home;
            this.duiIcon1.IconSize = 22F;
            this.duiIcon1.Location = new System.Drawing.Point(15, 15);
            this.duiIcon1.Name = "duiIcon1";
            this.duiIcon1.Size = new System.Drawing.Size(29, 25);
            // 
            // TabItem
            // 
            this.Controls.Add(this.duiIcon1);
            this.Cursor = System.Windows.Forms.Cursors.Hand;
            this.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
            this.ForeColor = System.Drawing.Color.Black;
            this.HoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(49)))), ((int)(((byte)(56)))), ((int)(((byte)(62)))));
            this.InheritanceSize = new System.Drawing.SizeF(1F, 0F);
            this.IsPureColor = true;
            this.PressColor = System.Drawing.Color.FromArgb(((int)(((byte)(49)))), ((int)(((byte)(56)))), ((int)(((byte)(62)))));
            this.Size = new System.Drawing.Size(246, 51);
            this.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.TextInnerPadding = new System.Windows.Forms.Padding(50, 0, 0, 0);
            this.MouseEnter += new System.EventHandler<System.Windows.Forms.MouseEventArgs>(this.TabItem_MouseEnter);
            this.MouseLeave += new System.EventHandler(this.TabItem_MouseLeave);

        }

        public DSkin.Common.FontAwesomeChars Icon
        {
            get { return duiIcon1.Icon; }
            set { duiIcon1.Icon = value; }
        }

        private void TabItem_MouseLeave(object sender, EventArgs e)
        {
            this.ForeColor = Color.FromArgb(176, 176, 176); 
            duiIcon1.ForeColor = ForeColor;
        }

        private void TabItem_MouseEnter(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            this.ForeColor =Color.White;
            duiIcon1.ForeColor = ForeColor;
        }
    }
}
